How do I exclude an IOS 8 app extension from a build? - ios8

I am building two versions of my app from the same code base, one for IOS 7/8 and one that is IOS 8 only. I would like to exclude the extension from the 7/8 applications but include it in the IOS 8 version. I've looked in the info.plist, the build phases and the schemes for the apps and the extension and have found no references to either.
I'm sure I'm missing something simple. Any hints?

I've looked in the info.plist, the build phases and the schemes for the apps and the extension and have found no references to either.
Look again? The setting that controls whether an app includes an extension is in the build phases for the app. By default it's called "Embed App Extensions", but you can rename it to whatever you like.
Select the extension(s) and click the "-" button at the bottom.
You probably also want to remove the extension from the target dependencies for the 7/8 app.

Related

Appcelerator App Conversion iOS to Android.

One of our developer developed an app in appcelerator using alloy framework for iOS which works fine. Now we want to run the same app in Android, since the appcelerator is a cross platform tool, we wish to make the Android version of the App. I tried searching about it and explored the applcelerator ide for options but couldn't find it. Can some one please guide me into the right direction?
First of all have a look at this link : http://docs.appcelerator.com/platform/latest/#!/guide/Supporting_Multiple_Platforms_in_a_Single_Codebase this will guide you to update the application for multiple platforms.
Their are basically two different ways to port any application from android to iOS or vise-versa, but before that just let me clear one more thing to you about tiapp.xml.
In the tiapp.xml of your project you need to updated the Development Target by checking for which platform you are developing the application for (iPhone, iPad, android, Mobile Web).
Option 1 :
Cross Platform is build to make code re-usable (i.e. re-use same code for all the platforms), but we have exceptions with many things. Their are lot of components that work fine in iOS but when you use them in android then you will face errors. So in that case you just need to apply conditions for android and iOS like below :
if(OS_ANDROID)
// do something
else if(OS_IOS)
// do something
What you need to do is that you need run the application in android simulator and test the application for these changes and then apply the changes accordingly.
Basically a developer has to target the UI for both the platforms, as their will not be any logical differences between the two. Also their will be UI changes between the same components, like for example a picker in iOS will not look the same as it will when you look it in an android application.
Option 2 :
Now in the project you have assets folder with the platform that you have selected in the tiapp.xml (i.e. iPhone, android etc).
You can create similar structure in the style and view folder, create two folders iOS and android in both the directory (i.e. style and view).
First, move .tss of style folder (except app.tss and index.tss) in the iOS folder, then copy the files in the android folder also.
Repeat the similar process with the View folder also.
Now you have two different structures (i.e. view and styles) according to their platform. Now you can run the application in android simulators and resolve the error that you face.
Hope this small information helps the cause, you can also have look at the documentation of all the components from below link :
http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TableView

xCode exclude watchkit extension for submitting

I wrote an app using watchkit and wanted to submit it yesterday after Apple releases iOS 8.2. Unfortunately I got to know here on stackoverflow, that apps using watchkit are not allowed to be submitted yet...
I do think that my app is also good as a standalone iPhone app and would like to submit the watchkit part as an update as soon as it's possible.
What is the best way to exclude the watch extension from my archive I want to submit? I don't want to build up a whole new project if possible.
I tried unchecking the "Target Membership" of the Extension.appex in my products folder. I then got this error:
How can I exclude the watch extension the right way?
If you want to exclude the WatchKit extension from your app, you just need to remove their targets from the targets list in your project. And remove their related files and groups.

How did my Xcode project get changed from iOS project to an OSX project?

I've been doing only iOS development and never made an OSX app. In the iOS project I'm working on now I see that suddenly Xcode thinks it's an OSX project. The all my framework files are shown in red (missing), and lots of the options in the project panel show choices that are only appropriate for OSX such as "deployment target", which offers only 10.4, 10.5, 10.6 etc. and in Build Settings the Valid Architecture shows i386 x86_64 with no drop-down options.
What happened? How can I change this back to an iOS project?
could be 2 late to answer this question, however, this answer might help someone in the future, as the above answer wasn't helpful for me, so here is what I have done.
1- on the left top corner of Xcode click on the scheme.
2- click edit scheme
3- in the new window change "Executable" from non to the name of your project scheme "target"
4- on the top where it says "My Mac 64-bit" if it didn't changed automatically to iPhone/iPad change it manually.
5- if there wasn't any option, in bottom of the window click "Manage Schemes" and make sure the
check box next to your project scheme is checked.
hope this could help and save anyone time.
By your comment you should not have an issue navigating this.
Go to your Project (in upper left) -> Project (project name in submenu) -> Build Settings -> under Architectures menu select Base SDK and choose iOS 6.1.
This should switch your project back. Now under Info you should see your Deployment Target options have switched from saying OS X Development Target to iOS Development Target
As for why it originally changed, I have no idea. But hopefully this will fix your issue.
I know this is an old post, but this just happened to me in a project with multiple targets.
I'm using github and it had marked one of my target scheme files with a merge block at the top of the file after using a newer compiler. I could find a way to edit the scheme through XCode, but upon re-opening the project, it would be bad again.
I had to edit the file manually and complete the merge edit.
This recently happened to me with Xcode 8 where an old iOS project was turned into a dual destination macOS / iOS one.
To fix the issue I changed the Base SDK under Project -> Build Settings to Latest iOS (iOS10) and the change rippled through removing the macOS destination.
I fixed this by deleting the scheme showing issue and recreate it. This time it gets created as desired scheme type showing all the simulators and devices attached, if any.

Xcode default scheme and architecture setting mismatch (iPhone development)

I am developing iPhone application and choosing to build iPhone project. However, I don't know which setting or which part I edited in info.plist. Now the default scheme and architecture is set to be Mac application development.
Can anyone tell me how to edit the .plist file or make any setting to make the project build in iPhone/iPad stimulator nor Mac, when I choose to build an iPhone/iPad project. (I had edited the plist file using terminal, so I not sure which part I did wrong and cause this problem).
Because now every iPhone application project cannot be built, even for the new iOS application project (due to the setting will auto set to Mac nor iPhone).
in the build settings for your project (and you may have to do this for each target) change BaseSDK to Latest iOS.
i have no idea why changing the info.plist in one project would affect any new projects you create, tho.

iOS 3.x support in Xcode 4

Is it possible to write apps that support iOS 3.x versions using Xcode 4? If so, how? And does Apple have any official recommendations on app backwards-compatibility?
To get your app successfully run in iOS 3.x device, follow these steps (Xcode 4.2):
Click on your project name, select your Target and under "Build Settings"
a) Set "iOS development target" (under "Deployment") to 3.0
b). Add "armv6" to list of "Architectures" (under "Architectures").
c) Set "Other Linker Flags" (under "Linking") to "-weak-lSystem".
In your Info.plist file remove value of "armv7" from "Required device capabilities" (UIRequiredDeviceCapabilities).
In your code:
a). Do not use userInterfaceIdiom. If you need to know, what device is it (iPhone or iPad), see How does one get UI_USER_INTERFACE_IDIOM() to work with iPhone OS SDK < 3.2.
b) Do not use window.rootViewController. Instead use [window addSubview: self.mainViewController.view]; to add your main controller's view to window.
Click on your project name, select your Target and under "Build Phases" / "Link Binary With Libraries" set "UIKit.framework" to "Optional". Also set to optional any extra framework, which is not available in iOS 3. For example, if you're using iAd or Twitter frameworks they should be set to optional. Check availability of extra framework in your code before use.
When run on real device, compile app against last version of SDK. To do so, select second item from "Scheme" drop down (otherwise you'll get compile error related to your optional SDKs):
Yes, you can develop apps that support previous iOS versions with the current iOS SDK.
For official recommendations, see Apple's SDK Compatibility Guide.
The version of Xcode that you use isn't related to the version of iOS that your app can support. To choose the version of iOS that your app supports, simply change the iOS deployment target in your project settings. Then just be sure not to use any APIs from versions later than that.
to be sure, you can use Xcode 4 for targeting iOS 3.x as a deployment target, but you will not be able to simulate your program on a iOS 3.x SDK simulator. So you are pretty on your own (i.e., if you use any iOS 4.x-only feature, you will not find out it until you test on a physical device).
You need an older version of Xcode to debug against an older simulated SDK.

Resources