I have recently made two Frameworks (Extensions & SpotifyAPI), which are targeting iOS 10 just like my project. My phone is running iOS 12 beta (16A5345f). Xcode is running Version 10.0 beta 6 (10L232m).
Here is the project when I target the simulator or my device:
Ignore the warnings, they are expected. The errors are not expected.
For a reason I don't know, the Frameworks don't seem to be recognised when my iPhone is targeted. ALL these errors are functions, variables etc, which are apparently "unresolved identifiers" or "undeclared types" or "has no members" from my Frameworks.
Why does this only work for the simulator, and not my device? Is my Framework not supporting a certain type of architecture?
Here is my hiarachy:
I tried to run it in Xcode 9, but I got this:
So I deleted and reinstalled Xcode 10 but still with no luck.
How can I allow my project to run on my device?
If you have any questions, please ask!
Well this was frustrating... but I know people will come across this problem in the future, so here the answer is. All you need to do is build the Frameworks targeting your iOS device, and then it will work completely fine. Apple, couldn't you make it any clearer?
However, this causes the opposite problem, that the device no longer works in the simulator. π€
EDIT:
I found this Medium post about how to make a universal framework, and got it to work π
Related
As I am working on the iOS app since past few years, I was able to run it on devices and simulator both which is totally easy. But from few days I am facing a time wasting problem.
Whenever I am trying to build my project in iOS device it gives me "Module Not Found Error" also it includes other error like "Unknown Type Name Dipatch_Queue_t" etc. But the strange thing is it is working fine in simulator, it builds and run on simulator as it should but not in device. The error usually comes in PODS target.
AND THIS HAPPENS WITH ALL THE APPS I AM TRYING TO BUILD IN XCODE.
Working Environment - xcode 10.2.
Kindly suggest me what is wrong here, which I am not able to understand.
sometimes we stuck in some weird issues which we can't debug, so this issue is one of the case where I got to know some how the framework file of whole Xcode is corrupted but you can-not debug the Xcode framework, In my case even the framework file is not opening to check whether I wrote anything mistakenly, So solution was I delete the Xcode and reinstall the same version. If you want, you can download the upgraded version of Xcode as well. So all framework files are new and it is working fine now.
i want add a Comment to these Answer,Test iOS app on device without apple developer program or jailbreak but i don't have 50 comments :(
I want to know if is possible that I install xCode7 beta, than go back to xCode6.4 and start from xCode6.4 my App on my device? I have problems with the convert from my projects from xCode6.4 in xCode7. I hope someone can help me. I can start the Apps from xCode7 on my device without problems :) but i need the code from xCode6.4...
Please Help me...
Greetz
Xcode is only an IDE you use. In general, an IDE could switch freely.
BUT with IOS development you always work against a Base SDK that defines the abilities of the apple frameworks.
Now Xcode 7 comes with IOS SDK 9
Xcode 6 comes with IOS SDK 8
So Switching between Versions of Xcode also switches the base sdk (unless otherwise configured)
--> your app may behave differently with different base sdks. If that is acceptable though OR you don't see any change THEN switching is no issue
I switch all the time :)
EDIT: just saw the swift 2 tag. That is not supported in Xcode 6 so you can't switch
With Xcode 6.x we can use CocoaTouch Framework template to build a framework library and Xcode will create the .framework for us when we build, which is awesome. In our framework we want to support iOS 7.1 and up, so for Deployment Target (in our framework) we specified 7.1. Now when we build we see a warning: "Embedded dylibs/frameworks only run on iOS 8 or later". I've since read a number of blog posts on the subject that as far as running it on iOS 7.1 this warning can be ignored because it will run fine (still need to test to make sure). What concerns me is that I read a post on Stack Overflow which says an app may be rejected by Apple in the App Store (see: Xcode 6 and Embedded Frameworks only supported in iOS8)
Does it only apply when in Xcode the app links to it in General > Embedded Libraries?
The way we want our customers to link to our framework is:
Via CocoaPods
By referencing .framework in Build Phase > Link Binary With Libraries
I need to understand under what conditions App Store will reject an app which uses our CocoaTouch framework and supports 7.x iOS.
The app wont be rejected if you'll change the type of your framework to Static. See my answer here.
I believe that as long as the app deals with the framework correctly there shouldn't be any issues. Mixing with cocoapods could be tricky and honestly I don't know the best way to tackle it.
But from what I understand, if an app supports iOS 7.X -> 8.X and uses an embedded cocoa touch framework, as long as the compatibility checks are there to ensure the app doesn't crash in 7.X, there shouldn't be any reason for the app to be rejected.
We tried running the latest code on the following configurations:
iOS 8+ β iPhone 5s
iOS 7.1.2 β iPhone 4
iOS 6.1.3 β iPad 4
The App is working fine on all the three devices but the warning is present in the Xcode while compiling .
"embedded dylibs/frameworks only run on iOS 8 or laterβ
Also I tried to Archive the App in order to submit it to the app store it went on fine.
Also, found out a link where in an apple developer stated this to be a bug:
https://devforums.apple.com/message/999579#999579
Am adding QuickBlox to my iOS app and getting a link error for _iconv, _iconv_open &_iconv_close.
I have added all the libraries/frameworks as per QuickBlox's instructions. The only differences I can see is that in their instructions they use the libraries from the iOS 5.0 folder while mine are all in iOS 7.0, and that I have added libxml2.dylib not libxml.dylib (as libxml2.dylib is in that iOS7 folder).
Curiously this occurs only on iPhone simulator builds - building for a device is fine.
Simple enough to fix this by including libiconv.dylib - when I first ran into this problem it was part of a much larger issue caused by xcode always looking for the armvx libs instead of 386 ones for the simulator. Not quite sure why it now only needs that library for the simulator build though.
Have posted this as the answer for anyone glancing here to see if it was answered.
So, I've been updating this app that has a BaseSDK of 6.1.
So far it has been fine, until this afternoon. I ran it once on my iPhone 5 and it was fine (but crashed). It was running with the iOS6 look and feel like I wanted.
Fixed the bug (just a simple index out of bounds bug) and ran it again and now it runs with the iOS7 look and feel.
I've checked the deployment target and the Base SDK and I have no idea why it's doing this.
Can anyone point me in the right direction?
SOLVED
OK, so I managed to fix it.
I had to...
Quit Xcode.
Delete Derived Data.
Delete the app from my phone.
Restart my Mac and Xcode.
Rerun "pod update" for my cocoapods. (I tried this before with no luck).
Then start it all up again.
Now it's fine.
I haven't changed any code and all the Base SDKs and deployment targets are the same.
Oh well...???
Xcode 5 does not support SDK 6.1.
You can trick it to use it, but the behaviour is undefined.
If you have multiple SDKs installed, then Xcode 5 has a bug (or undefined behaviour, whatever) where it shows the connected devices twice (or N times for N SDKs installed) in the drop down where you select simulator/device.
Each of these icons will access the connected device using one of the SDKs you have installed, so even though they look the same, they'll have some odd side effects.
I always use the top one.. (better ideas welcome)