iOS widget extension works from xcode but not when archived - ios

If i run the extension or app from xcode, they both work fine, but if i archive, create an IPA file and install it via itunes, then the widget is always "Unable to load" (but the app itself still works fine).
I noticed that if i turn "always embed swift standard libraries" on for the widget target, then the widget installed with the IPA does work fine. BUT doing this means you can't submit it to the app store ("The bundle at … contains disallowed file 'Frameworks'")
Any ideas on how to find the problem? I can't see how the widget is crashing because it doesn't crash in xcode

I think i solved this thanks to step 3 on this answer: https://stackoverflow.com/a/29821624/160149
I had to add "#executable_path/../../Frameworks" to Runpath searchpaths in the extension target

Related

Xcode Archive made an empty Products folder : Validate Content Button is grayed

I'm trying to build an archive file for my first IOS app uploading with Xcode.
But after archiving, the Validate Content button is grayed.
Like this:
I think that's because the Products folder, which XCode made in the app archive package( .xcarchive file ), is empty.
My Xcode is ver. 11.4.1
And CocoaPods is ver 1.9.1
As an experiment, I made a new project and that archiving went well.
So Maybe something wrong with my main app.
Any idea what I'm doing wrong?
Now I figured it out somehow.
I made a new project file, and copied everything to the new project, it works well.
So I still don't know why my old one didn't work.
But let me close this question.

Can't upload .ipa from Xcode 11 - "The Info.plist indicates an iOS app, but submitting a pkg or mpkg"

I have an ios app in flutter and trying to submit app to apple store using Xcode. But getting below error while it starts uploading.
"The Info.plist indicates an iOS app, but submitting a pkg or mpkg"
As per other suggestions, I have checked my minimum version in info.plist and it's 13.
I have also tried to export file but it's not exporting only .ipa file now and exporting multiple files in a folder.
Thanks
This issue commonly caused by LSMinimumSystemVersion. You should remove it from the Info.plist inside of your app. That value is for macOS only.
If that's not the case, then just create a new dummy Xcode project and compare its Info.plist to the one in your project. So, you can notice something unusual.

xcode sumbission the application you have selected does not exist

Has anyone seen such an error ? What does it mean ?
It was an update of already existed app.
Xcode automatically manage provisioning profiles.
Xcode 6.3.2
OS X Yosemite 10.10.3
try to use Application Loader (https://itunesconnect.apple.com/apploader/ApplicationLoader_3.0.dmg)
Had the same problem with Xcode 6.4, but went thru using Application Loader
Or you can open it from Xcode -> Open Developer Tools -> Application Loader
I finally got my binary uploaded to iTunesConnect.
Archive your app in Xcode as normal. (I'm still using 6.2)
In Organizer, select the archive, Export, select Ad Hoc or App Store. This saves an .ipa file.
Open AppLoader, select "Deliver Your App", click "Choose", select the .ipa file from step 2. Follow the prompts.
Notes
Going this route, you won't need to recreate the In-App-Purchase that AppLoader expects when you start from scratch.
I got a warning that the API analysis file being too large, but I think that can be safely ignored.
The uploaded binary has a warning that the entitlement for TestFlight Beta testing is missing, but I don't use that, and it can also be ignored.
If you have xcode < 7.x then you are going to face this problem..What fixed for me was building the project from xcode 6.x(mine 6.4) and then opening xcode > 7.x (mine 7.0) and then uploading app from there...
Note:You dont need to build app from xcode 7.x . Just open the xcode
and select window organizer...select the build and upload...
In my case firstly I installed last Xcode version 7.1
In my application I used GoogleMaps.framework, I opened it's bundle and removed "Executable file" and "CFSupportedPlatforms" from Info.plist, then I did the same to all my added frameworks
Finally fixed this problem, first you need to upload it with Application loader. Cause when the error happen, you can have more detail about it.
This is the Issues I got, and I found that the version numbers are the same as those library in cocoapod or other library. To solve this. Go thought all the info.plist. And change the Bundle versions string, short, and Bundle version to higher value, in my cause version number > 1.3.5.
hope this can help :D
Im stuck with the same issued, solved by download xcode 7 and submit app with it, error gone!. Hope it help everyone!.
I was using atool from a shell script to verify and upload builds to TestFlight, then I found this thread and decided to follow #bwang's advice to use the Application Loader, and it worked!
I didn't have to download ApplicationLoader because it already comes bundled with Xcode 6.4, I just opened Xcode, then from the Dock I right clicked the Xcode icon, and then I selected "Open Developer Tools > Application Loader".
I hope Apple fixes this issue soon, because its breaking many CI tools like jenkins when using it to upload builds using atool.
Encountered the same issue, tried all the options mentioned but no luck, Finally could solve the issue by modifying 3rd parties info.plist
Search all info.plist files in your project and see where each and every plist has "Bundle Identifier". If not add it and submit via application loader.
When Xcode submission isn't working, upload using Application Loader instead:
Archive from Xcode.
Save the resulting .IPA file.
Upload with Application Loader.
That solves this issue and many other times when Xcode upload isn't working. Additionally, if it still fails, it will often give you a more detailed error message output.

Apple Watchkit simulator issue: SPErrorInvalidBundleNoGizmoBinaryMessage

When I open my existing Watchkit app (Xcode 6.2), it compiles correctly, the simulators are launched (iPhone+Watch), followed by the meaningful error:
Error Launching 'xxx Watchkit Extension'
SPErrorInValidBundleNoGizmoBinaryMessage
I have this issue with all simulators (iPhone 5/5S/6/6+ - 38mm/42mm)
Any ideas what the issue can be?
It seems for some reason the application does not want to run on the simulator, even though it used to. The iPhone application included in the same project does run, as do other Watchkit sample applications.
Did you change the bundle ID of your app? If so you may need to manually update the WKAppBundleIdentifier in the WatchKit Extension and also the WKCompanionAppBundleIdentifier in the WatchKit App.
WKAppBundleIdentifier may need to be same to WatchKit App's Bundle Identifier.
Please check WatchKit Extension's info.plist.
NSExtension - NSExtensionAttributes - WKAppBundleIdentifier - xxxxx.watchkitapp
EDIT: Further explanation to clarify...
Under your App target you go to INFO tab and set Bundle Identifier to com.myapp
Then under the WatchKit Extension target you go to INFO tab and set the Bundle Identifier to com.myapp.watchkitextension
Then still under the WatchKit Extension target and still under the INFO tab you set NSExtension > NSExtensionAttributes > WKAppBundleIdentifier to com.myapp.watchkitapp
So one ends with .watchkitextension and the other ends with .watchkitapp
Check Info.plist for "Your App WatchKit Extension" & "Your App WatchKit App". First part of all indentifiers should be same.
In my case problem was in "Your App WatchKit Extension" > NSExtension > NSExtensionAttributes > WKAppBundleIdentifier.
Be sure you are using an 8.3 simulator.
I got this message consistently when using 8.2. Tried everything listed here and struggled with this for hours. Switching to 8.3 resolved it. Ironic, since you must set the deployment target to 8.2 at the moment, but watchkit apps need 8.3 to run I guess...
I checked all bundle identifiers multiple times but couldn't get rid of the issue. Neither did cleaning the build folder work out.
However, I was able to sort it out by turning off Game Center at the Capabilities of my WatchKit Extension.
Turning it on for the iOS host app seems to work fine, but turning it on for the WatchKit Extension results in the SPErrorInvalidBundleNoGizmoBinaryMessage error when attempting to run the WatchKit App in the simulator, while it completes building without any complaints.
I'm developing a game for Apple Watch and was looking forward to support Game Center. It was actually my plan from the very beginning to communicate with the hosting iOS app to do so, but then I saw Game Center listed in the Capabilities of the WatchKit Extension itself, so I expected to be able to deal with it right there. However, as it doesn't seem to work, I'm going to stick to my original plan to support it through the hosting iOS app.
Xcode Version 6.2 (6C131e)
EDIT: Same issue with Xcode Version 6.3 (6D570)
For issues on real devices (not simulator), do everything in this post:
http://blog.jaredsinclair.com/post/117350678170/jareds-code-signing-tips-apple-watch-edition
Most importantly:
All three targets require the following:
a unique app ID for that target a code signing identity (applies to
all targets) a unique provisioning profile for that target.
and make sure that the app ID's are consistent:
Your app IDs will look something like this:
com.company.App-Name
com.company.App-Name.todaywidget
com.company.App-Name.watchkitapp
com.company.App-Name.watchkitextension
If it still doesn't work, manually delete the app from the watch (by holding onto the icon and then hit 'x') and then try again. This was the kicker that did it for me.
The procedure I solved the problem is
Check if WKAppBundleIdentifier and bundle identifier in WatchKit extension and WatchKit App are correct
Delete subfolders of ~/Library/Developer/CoreSimulator/Devices
Delete subfolders of ~/Library/Developer/Xcode/DerivedData
Clean my project
Restart simulator
Run
I've been struggling with this as well. This is what solved my problem on Xcode 7.1 iOS 9.
Just Make sure you follow the naming below for your identifiers:
Target - com.myCompany.myApp
Watchkit app - com.myCompany.myApp.watchkitApp
Watchkit extension -
com.myCompany.myApp.watchkitApp.watchkitextension
The extension should have the identifier of the WatchKit app target + .watchkitextension
I've tried everything posted thus far in this thread but still couldn't get it to work. I resorted to backtrack to the point when it was working and retrace every single action that I've done to figure out at which point it breaks...
As it turned out, the WatchKit App's info.plist file does not like any custom plist entry, at least that is what I've found out in my case. I've added an entry called "MyAppBundlePrefix" and it caused the "Error Launching 'xxx Watchkit Extension' SPErrorInValidBundleNoGizmoBinaryMessage"
I wish XCode would offer a little bit more specific detail for that error but it took me about 5 hours to find it out by brute force way.

Apple watch simulator issue

I am trying to debug and run the app on apple watch simulator. I have tried by using different target for notification, Glance and Watch app but apple simulator don't shows any thing.. It stuck in waiting for attach process of extension. I just see a black screen for the Apple Watch Simulator.
What did I do wrong?
How to overcome this issue ?
This post from the dev forums solved my issue. More specifically, this excerpt:
In order for Watch apps to function properly, certain properties
must match across the Watch app and its App Extension (18857540):
The WKAppBundleIdentifier property of NSExtensionAttributes in the WatchKit App Extension’s Info.plist must match the
CFBundleIdentifier of WatchKit App's Info.plist.
The WKCompanionAppBundleIdentifier property of the WatchKit App's Info.plist must match the CFBundleIdentifier of the Containing iOS App's Info.plist.
I have exactly same problem. I created a new project and added WatchKit extension in Xcode 6.2 beta 4 with WatchKit. I tried all ways mentioned in other answers but still failed to let watch app run in the simulator. Finally, I made it work.
My steps:
Delete the containing app in the iPhone simulator.
Clean your project in Xcode.
Do not run the containing app, run the WatchKit app from Xcode.
I had the same issue. The only thing that helped was to delete and recreate the target scheme.
Before spending a lot of time on changing things, restart Xcode. Sometimes, this solves the problem.
Even if everything is configured correctly, it may take 20 seconds to attach the process to the debugger.
You need to run the Watch App target and then from iPhone/iPad simulator check (Hardware -> External displays), any one of the Apple Watch options.
I was experiencing the same issue. Mainly when creating an app extension in an existing app.
I was able to consistenly solve it by doing the following steps:
Make sure that the app extension gets the .appex extension. XCode tends to set it to .app. You can do this under 'build settings' -> 'wrapper'.
Under the 'Build Phases' tab in your target, your app extension should be listed under 'Embed App Extensions'. If you don't see this section, you can enforce it by adding a normal app extension to your app (fe. action extension). The section will now be visible. Replace the dummy extension you just created with the Watch app extension.
Start the host app and then start the Watch app, it should be working now.
I had some trouble on iPhone 6 simulator, but each time I switch on iPhone5S it works.
In my case the trouble was caused by a scheme with missing target although not the one I was trying to run.
Hope that helps somebody.
I was running into this problem as well and tried a few of the suggestions above. I found that deleting and recreating the target scheme resolved it. Everything is working fine now.

Resources