iOS 8 Today widget does not appear when running the project - xcode

I have an app with 2 targets and added a today widget. When I run it it doesn't appear on the today notifications Edit/ in the "Do not include" section, where it normally appears the first time with my other apps. Any idea what could be going wrong? I get the entitlements missing warning for the extension but i get this for the ones that work too ( have tried adding one, doesn't help).
Also if i try attach it as a process under the debug menu, it does not appear there at all/
I have tried deleting app from simulator and resetting etc, I have tried with another app that has multiple targets as i thought this may be the problem but the other one works.
Anyone else have a similar experience or can suggest anything?
Edit 6 Oct 2014: I still haven't found a solution, but my project does not use arm64. Could this be the issue ? i have tried removing arm64 from other projects but I think Xcode 6 doesn't allow it so I can't test it, does anyone know if this is a possibility?

In my case, the reason for the widget not being shown in the list of widget was a too high deployment target number. For the widget, I had 9.0. However, I downgraded my iPhone from 9.0 to 8.4 and forgot to change it for the widget.
After changing it to 8.4, the widget immediately appeared on the iPhone.

Make sure you're running the containing app not the extension in the simulator.

I have seen this issue when there is a mismatch in the bundleID between the app and the extension.
Example (Correct):
App bundleid: com.yourcompany.myapp
Ext bundleid: com.yourcompany.myapp.myextension
The extension needs to have the entire bundleID of the app, followed by its own name.

Make sure:
"Deployment Target" is same to containing app's (#vomako 's answer);
Bundle ID follows correct format: "com.yourcompany.myapp.myextension", while your containing app's is "com.yourcompany.myapp" (#RohitGupta 's answer);
While debugging, you need to run widget/extension scheme (not containing app's scheme here. But if archive to submit to App Store, use containing app's scheme);
"Build Settings"'s "WRAPPER_EXTENSION" is "appex".
Point 4 was not mentioned in all answers (even official doc), but happened in my case.
I created Today Widget for my existing project in a workspace, not works at all. However, when I create pure new project with Today Widget, it works well. Then I compare the Build Setting one by one and found this difference: The one created for my existing project is "app", not "appex".
After changing it to "appex", works.
Also, as tips, in order to pass App Review, you must:
Include the arm64 (iOS) or x86_64 architecture (MacOS) in widget/extension's Architectures build settings;
Specify “iPhone/iPad” (sometimes called universal) as the targeted device family for your app extension, no matter which targeted device family you choose for your containing app;
A containing app that links to an embedded framework must include the arm64 (iOS) or x86_64 (OS X) architecture build setting;
Always choose “Frameworks” as your Copy Files build phase destination (do not choose the “SharedFramework” destination instead).

In my case the Build phase "Embed App Extensions" of the app target was missing the appex file:

Related

how can i change the name of my mobile app using xcode7

My app is currently called a silly name. Does anyone know how to change it using xcode7?. By app name i mean when you see the little app icon on the home screen with the apps name below it.
i have looked at other answers but they are only explained using Xcode 4-6.
xcode7 only!
Well, if you want to simply change your app's name in Springboard (aka Home screen), without renaming your project, targets and etc (which is always a lot of pain), you can just change "display name" in your app's Info.plist.
More info here: https://developer.apple.com/library/ios/qa/qa1823/_index.html
As far as I know, it applies to all versions of Xcode.
This did not change at all for quite a long time, so any older Xcode version answer does still apply:
In Project Navigator select your project > select your build target >
go to Build settings > Product name
Just change product name for your target.

The selected device specifies an unsupported architecture

I'm trying to launch an Objective C app built on Xcode5 on Xcode6 beta (Version 6.0 (6A215l)). I get the following message when trying to build for any platform except for iPhone 5s:
Xcode cannot run using the selected device.
The selected device specifies an unsupported architecture.
It's not even obvious how to begin troubleshoting this as I can't get to the point where the console is activated. Any pointers?
I just had this myself.
I tried a few things (closing simulator before running, having it open, resetting), but what seemed to fix it was a simple clean, build and then run
If that's not it then I have a couple of other things I did but I don't think they were responsible
I was getting the same issue when the Xcode-> Targets-> General-> Deployment->Devices selected is iPad. but I am going to run this project on iPhone. check your project.
I bumped into this issue after changing the Executable file field in the info tab of my target settings - changing this back to the default ${EXECUTABLE_NAME} fixed it for me.
I was getting the same issue and no amount of cleaning solved it. I had to remove all Swift files from my project. Then I re-added them, but made sure to unselect the "Add to Target" option in the file add dialog. Finally, manually added them to the "Compile Sources" section of your project's "Build Phases". This did it for me. (Also make sure no Swift files end up in the "Copy Bundle Resources" section of Build Phases).
Close simulator if it is opend
Press Command + shift + k (or clean the project by selecting product menu item from xcode menu) and then press Command + r (or run the project)...
iPhone3gs-->iPhone4s:armv7
iPhone5/iPhone5c: armv7s
iPhone5s --> iPhone6Plus :arm64
add architecture to BuildSetting -> Architecture

Generic archive created when updating an existing Mac app?

I've made an update to my existing Mac app and went to archive it.
In Organizer it came up as a new entry and not under the previous releases I had. This new entry appears generic, ie. no app icon, no version or identifier info, just the name of the app came through. What happened? How do I troubleshoot?
In the update I added a UTI and also copied a plug-in into my bundle. Could those things have something to do with it?
Got it. My problem was related to dependency targets. Here's the solution:
http://www.weston-fl.com/blog/?p=2429
(Excerpt added 2012-12-18; see blog post for screenshots and background info)
… Select dependent project(s) in the Project Navigator
Find “Skip Install” and set to YES.
If you have more dependent project, repeat these steps for all of them (i.e. at static library projects).
The app is expected to be deployed so do not change the Skip Install’s No to YES there. Change at the dependent projects only.

The selected run destination is not valid for this action

I have opened a project that has always been iphone/ipad. I can't build it now because for some reason my only "Scheme" option is "MyApp My Mac 64-bit". How can I get this set back to iphone/ipad simulator and devices? My "Targeted Device Family" setting is iPhone/iPad.
I had that issue several times. Basically, just set the Base SDK in Build Settings to Latest OS X and it should work properly.
I ran in to this issue recently and i solved it by changing the value of the executable from "None" to "AppName.app" on xcode.
You should change:
Product > Edit scheme -> Run AppName.app -> Info tab -> Executable -> None
to:
Product > Edit scheme -> Run AppName.app -> Info tab -> Executable -> AppName.app
Have you tried editing the Scheme? (I'm assuming you are running XCode 4). I believe you just might need to set the "Base SDK" setting to "iphoneos" (this translates to "Latest iOS").
I was facing same issue in my application and I solved it by following these steps:
1. Go to Project-> Build Settings
2. Change BaseSDK to Latest OS
The above solutions didn't work for me because Xcode 4 didn't give me any choices to go back to iOS. I closed Xcode, opened it again, and then it worked!
I have the same problem, it appears that you also made the jump with the new Xcode 4 upgrade and this appears to be a code incompatibility.
If you want to keep it for IOS (Iphone / Imac ) edit Scheme [Product/Edit Scheme/ Build/ build => Destination drop down list.
Make sure you have installed the Ios SDK before running Xcode.
Elsewhere if you have to compile the same app for the Mac, I'd like also to know the answer as this generate the same errors as you.
I had similar issue recently. Got it solved by doing some changes in Base SDK of Project. Following are steps :
Click on the top-level project icon in the left hand panel
In the right hand panel that appears, select Build Settings (near the top).
Select "All" option (instead of Combined)
Ensure Base SDK is set appropriately, like "OS X 10.7", "Latest iOS(6.1)" etc.
I also just ran in to the issue. For me I was trying to "Build for Testing" and was running into this error.
To fix it I had to "Edit Scheme..." and then in the "Build" dropdown click on "Build" and made sure to check the "Test" checkbox for the Target.
I had the same error message. My solution is to delete the info.plist file from build phrases -> copy bundle resources.
Deployment target is missing for specified SDK ...
Choose other "Deployment Target" (in the Build settings) and simulator will appear.
Note:It's happening when use 5.1 SDK(latest) with XCode 4 on Snow Leopard..
I've just got this error, for me it was because of some reasons my device name didn't appear in xcode devices dropdown, just a generic name. Unplugged and plugged back the device and was fine.
For me I had to combine a couple of the solutions here to get it to work. For me the Project Build Settings were set to "Latest iOS" already.
To fix it, I had to change it to "OS X 10.6", then build the app (it will fail to build), then set it back to "Latest iOS", which now works again.
I just installed Xcode 4.1 (painful!) and when I opened one of my apps that built fine before the upgrade, the only active scheme was "My 64-bit Mac". In this case, the required change was to Edit Schemes, and for the Build scheme's Info tab, set the Executable dropdown to my target. It was set to None. As soon as I did that, the simulator/device showed up instead.
Tried the rest of these with no joy.
AFIAK this is a version control problem, in general not just a Git problem!
I gave a colleague a copy of a project that had modified files in it and this problem occurred.
However when I committed/updated the repo and gave him fresh copy.
This problem was fixed!
I've hit the same issue, needing to build with the 10.6 SDK. But I've found that XCode 4.4 doesn't contain this SDK! So I had to put it back, by opening the XCode.app package contents, and going to:
XCode.app/Contents/Developer/Platforms/MacOSX.platforms/Developer/SDKs
and copying in MacOSX10.6.sdk from my old XCode 3 Developer folder.
Surprisingly enough, this works! When you quit and relaunch XCode, and select the Base SDK for the project, 10.6 appears in the drop-down.
But beware, when XCode installs an update, you'll have to repeat this process, as I found just now after updating to 4.4.1.
I got same error and for some reason after going through all these it did not work. Notice in the very top menue is had my App Name> IOS Developer. Changed to App Name> IPhone 5.0 and went right into Simulator and got no error.

iPhone Simulator starts wrong project

I have an old iPhone application that copied to a new location in order to reuse it.
So I
- copied the project directory to a new folder
- created a new xCode project and linked all copied files to edit
- edited the frameworks and plist files to point to the new project name.
The project compiles and can be run, but when I click "Build & run" in xCode, xCode builds the new project and executes the original project.
Am running xCode3.2 with iOS4.2
Any ideas ???
cheers
When Xcode requests that the simulator launch something, it seems to do it by product name only. Something that has happened to me more than once is that I've changed the bundle identifier on my project, subsequent builds have led to two products with the same product name on the device, then I've become a bit confused when changes I'm making don't seem to take effect.
Solutions are either to delete the older product from the simulator (which works the same as on a real device; tap and hold) or to change your product name. I have to admit that I've not tested changing the product name and the bundle display name so that the app has the same visible name on the device but a different .app name.

Resources