Hello.
We have a good experience with SFS2X for IOS in objectiveC language.
Now I would like to use it for mac OS application in swift
I follow the official docs
I use xcode 8.3.3 and macOS Sierra 10.12
- download the official frameworks 1.7.3
- create a swift macOS project
- add SFS2XAPIOSX.framework to the project (check to create a copy)
- Select the CFNetwork.framework from the list and click Add.
- Select the QuartzCore.framework from the list and click Add
- Select the Security.framework from the list and click Add
- add -lz and -ObjC
- add Bridge file
On RUN it gives 3 errors
/Users/nataliazlatin/Desktop/IOS_WORKS/2017/CompanyOrganizer/SFS2XAPIIOS.framework/Headers/UserVariable.h:19:4: error: expected a type
- (BOOL) isPrivate;
There is no much information about SFS2X for swift and I would like to ask if is it possible to use it?
And how to solve this errors on running.
Thanks
Troubles with SFS2X on osX
-
- Posts: 17
- Joined: 12 Jan 2016, 15:56
-
- Posts: 17
- Joined: 12 Jan 2016, 15:56
Re: Troubles with SFS2X on osX
Another thing is when I want to create a project with objectiveC and SFS2x
do the same steps with API integration
It is running well but crash immediately
I search on google and try to add SFS2XAPIOSX.framework in Embedded binaries but error didn't disappear
strange it doesn't run at all
do the same steps with API integration
It is running well but crash immediately
I search on google and try to add SFS2XAPIOSX.framework in Embedded binaries but error didn't disappear
strange it doesn't run at all
Re: Troubles with SFS2X on osX
Hi,
I think the 2nd problem is a library loading issue (as per the error logs in your screenshot)
If I remember correctly OSX is a bit stubborn with library loading and will look for your libraries under ~/Library/Frameworks.
Try copying the SFS2X OSX framework there and run it again. It should solve the problem.
As regards the first issue, I am downloading XCode 8.3.3 (4.5GB) and will get back to you after I have tested.
Stay tuned.
I think the 2nd problem is a library loading issue (as per the error logs in your screenshot)
If I remember correctly OSX is a bit stubborn with library loading and will look for your libraries under ~/Library/Frameworks.
Try copying the SFS2X OSX framework there and run it again. It should solve the problem.
As regards the first issue, I am downloading XCode 8.3.3 (4.5GB) and will get back to you after I have tested.
Stay tuned.
-
- Posts: 17
- Joined: 12 Jan 2016, 15:56
Re: Troubles with SFS2X on osX
Hi, thanks for your reply
On the second problem I copied SFS framework in folder project ,and even in xcode Library/Frameworks
Clean and run. Not help
On the second problem I copied SFS framework in folder project ,and even in xcode Library/Frameworks
Clean and run. Not help
-
- Posts: 17
- Joined: 12 Jan 2016, 15:56
Re: Troubles with SFS2X on osX
I create even a Directory Library/Frameworks
Re: Troubles with SFS2X on osX
Wait... the folder already exists and it is located under your User directory.
As I wrote about it is --> ~/Library/Frameworks where the ~ (tilde) sign means your User folder.
For example my user name is "Lapo" therefore the folder is located under /Users/Lapo/Library/Frameworks/
One extra question.
In the first issue you mention Mac OSX but you are importing the IOS API ... so I am confused as to which kind of project you're running.
Can you clarify?
Thanks
As I wrote about it is --> ~/Library/Frameworks where the ~ (tilde) sign means your User folder.
For example my user name is "Lapo" therefore the folder is located under /Users/Lapo/Library/Frameworks/
One extra question.
In the first issue you mention Mac OSX but you are importing the IOS API ... so I am confused as to which kind of project you're running.
Can you clarify?
Thanks
-
- Posts: 17
- Joined: 12 Jan 2016, 15:56
Re: Troubles with SFS2X on osX
Sorry, You are right. I create and osX project and insert SFS2XAPIOSX.framework
Same errors
Same errors
-
- Posts: 17
- Joined: 12 Jan 2016, 15:56
Re: Troubles with SFS2X on osX
ObjectiveC
There no such folder User/MyMacUser/Library/Frameworks
But there is a mac/Libary/Frameworks and I put it there and it works at least in objectiveC
lets hope that this will work even for Swift
I will report later
There no such folder User/MyMacUser/Library/Frameworks
But there is a mac/Libary/Frameworks and I put it there and it works at least in objectiveC
lets hope that this will work even for Swift
I will report later
-
- Posts: 17
- Joined: 12 Jan 2016, 15:56
Re: Troubles with SFS2X on osX
unfortunately in swift it event doesn't run because of errors in compiling
Re: Troubles with SFS2X on osX
eugenofarm wrote:ObjectiveC
There no such folder User/MyMacUser/Library/Frameworks
But there is a mac/Libary/Frameworks and I put it there and it works at least in objectiveC
lets hope that this will work even for Swift
I will report later
It is actually under /Users/ not /User
I am running OSX 10.11 so maybe something is changed in Sierra but I doubt it, since those folders have been there for a very long time.
At any rate copying in it under the top level /Library folder works the same, of course. It's just that usually requires admin privileges to copy stuff, while your user's Library doesn't.
Cheers
-
- Posts: 17
- Joined: 12 Jan 2016, 15:56
Re: Troubles with SFS2X on osX
Thanks
Can you check why in swift id doesn't run
Can you check why in swift id doesn't run
Re: Troubles with SFS2X on osX
Yes,
I have have checked under XCode 8.2 (8.3 doesn't run on El Capitan, which is my OS at the moment) and there are no issues.
At this address you can download the test project.
Please try it on your side.
Before running the test, copy the SFS2XOSXAPI.framework file to --> /Library/Frameworks/
( Copy it, do not move the file )
Then open the project, compile and run.
If there're still problems, tell us what errors do you see.
Thanks
I have have checked under XCode 8.2 (8.3 doesn't run on El Capitan, which is my OS at the moment) and there are no issues.
At this address you can download the test project.
Please try it on your side.
Before running the test, copy the SFS2XOSXAPI.framework file to --> /Library/Frameworks/
( Copy it, do not move the file )
Then open the project, compile and run.
If there're still problems, tell us what errors do you see.
Thanks
-
- Posts: 17
- Joined: 12 Jan 2016, 15:56
Re: Troubles with SFS2X on osX
Thanks for your help and fast answers.
It work very well
I think the problem is that I didn't insert
#import <Foundation/Foundation.h>
#import <CFNetwork/CFNetwork.h>
#import <QuartzCore/QuartzCore.h>
#import <Security/Security.h>
in bridge file
Good job (Y)
It work very well
I think the problem is that I didn't insert
#import <Foundation/Foundation.h>
#import <CFNetwork/CFNetwork.h>
#import <QuartzCore/QuartzCore.h>
#import <Security/Security.h>
in bridge file
Good job (Y)
Re: Troubles with SFS2X on osX
p.s. = we added in the docs the extra steps regarding the Swift bridging header and a note regarding the need to copy the SFS2X under /Library/Frameworks for OSX.
Cheers
Cheers
Return to “SFS2X iPhone / iPad / OSX API”
Who is online
Users browsing this forum: No registered users and 34 guests