Hi i am using iAd Banner in my test aap.It works fine with 4.0 Sdk but when i went with SDK 3.0 or before ,it crashes without showing anything.I read that weaklink will help me regarding this problem but as per my thinking it crashes when it doesn't find the framework.I do not even know that how to use Weak-link.Please help me to fix this problem.
Expand the Targets directory, right click , and choose “Get Info”. Click the Build tab, make sure “All Configurations” is selected, and navigate to Linking\Other Linker Flags. Double click on that entry, click the “+” button, and type “-weak_framework iAd”.
When allocating your ADBannerView, first check to see if the OS version supports it:
if(NSClassFromString(#"AdBannerView")) {
//Allocate ADBannerView here
}
Then in the build settings of your target, add -weak_framework iAd to Other Linker Flags in the Linking section.
Edited as per Jonathans recommendation.
Related
In xcode, I tried to add a tap gesture to my app and when I built it, it started a problem with Xcode. It goes from building, 'running on iPhone 6.1 simulator' to 'finished running on iPhone 6.1 simulator'.
If the simulator is closed, it starts up with a black screen and you cannot click the home button etc. If open, nothing happens, the app doesn't install but the simulator doesn't crash.
I have tried the armv6 architecture 'fix' but that didn't work. I have also cleaned the project and project data. I have reset the simulator multiple times as well.
If I add the old files to my new project, it works up to a point (I copy and paste old files into new) but then the same happens.
Thanks for your help in advance!
NOTE:
New blank projects build and run fine.
EDIT: It still didn't work after undoing my previous actions, and the simulator is responding according to Finder, although the screen stays black
–––––––––––––––––––––––––––––––––––––––––
UPDATE
I had a folder named 'resources' in my application, imported as a reference which, following links from the thread #arthan.v supplied me with fixed the problem. What I did was rename the folder to files and reimport it.
Thank you so much, I spent 2 days trying to fix it before now!
Click the Center Button in View on your right hand side of Xcode.
In your Bottom bar, you'll see error: failed to attach to process ID 0.
Check these error: failed to attach to process ID 0 and Xcode compiles my App, but can't run it in the simulator
This sometimes gets fixed by these steps:
iOS Simulator > Reset Content and Settings ... > Reset
Xcode > Build and Run
I experienced the same issue after I had re-organized some code and renamed the workspace and project. Eventually realized there was an old version of my test app on the simulator's homescreen. I delete that and then everything was building fine again.
You might need to add the device to the provisioning profile. I experienced this on Xcode 6 and a real device.
I'm attempting to upload my first app to the app store using xcode 4.3, but can't get past this error... "application executable is missing a required architecture. At least one of the following architectures must be present: armv7" I looked up the issue. Their are several post on stackoverflow addressing the issue, but none of the suggestions listed worked. I attempted to add armv6 and armv7 to the build settings, but the errors still persist. Any suggestions would be welcomed. Thanks.
screen shot here..
http://dl.dropbox.com/u/2813968/Build%20Settings.png
For Xcode 4.5 at least, set the deployment target to at least iOS 4.3 and that will resolve it. Earlier versions of iOS and armv6 are almost extinct.
Make sure that these settings match your Target and not just your Project settings.
1) Left-click project icon (blue icon, under "Run" button).
2) Next to the project icon (to the right of it), left-click on project name under "PROJECT" (White background).
3)Select tab "Build Settings" and look for tab "Build Active Architecture Only" -----change to -----no
I was going through the Hello World tutorial for iPhone App. I recently bought a Macbook and have installed Xcode 3.2.3. The tutorial says that I should double click on MainWindow.xib and wait for few seconds to see an Interface builder getting opened. But nothing like that is happening in my macbook. Is there an alternate way to bring up the Interface builder or even to check whether I have the Interface builder at all!?
http://img683.imageshack.us/img683/3412/problemym.png
Rest of the stuff like iPhone simulator are working properly. What am I doing wrong. Please help me.
Thanks
Go to finder and search for "interface builder" as a file name. see if the application is there.
If you have tried everything listed on all websites over internet and if nothing works then try this:
Right click on MainWindow.xib -> GetInfo -> General -> "Path: Relative to current SDK"
I'm trying to create a universal iPhone/iPad app using this method: http://www.enscand.com/roller/enscand/entry/ready_for_ipad which is also described all over the web. My problem is that the "Upgrade current target for iPad" line is grayed out and doesn't appear at all when I right click the target.
I'm working on an app that I inherited from someone, and have tried this with an app that I wrote entirely myself (no problems on that one). And yes, I'm sure that I'm selecting the target.
Just wondering if anyone has any insight into what checks are being run that would cause this option to be unavailable.
It took me a while to realize that you have to have a target selected before the menu item will become enabled.
I figured out that you have to select the target from the window on the left "Group & Files" for that "Upgrade Current target for ipad" to show.
I found the solution. After upgrading first target just rename Resources~iPad group in Groups&Files (e.g. to ResourcesFirstTarget~iPad). After that you can upgrade your other targets with "Upgrade Current Target For iPad".
I had this problem because I was trying to do it with the xib file selected, not the item under the the 'Targets' folder.
I just found that my project was set to "iPhone" for Distribution, but it was still set to "iPhone/iPad" for Debug. After switching to "iPhone" for Debug also, the option to convert to a Universal app became available.
Im not sure if this is an actual solution but I solved this problem by selecting the target, going to "Project" and setting the Active Build Configuration to "Release". Update Current Target for IPad then became enabled.
I deleted the "Resources-iPad" group and voila - the "Update Current Target for iPad" became enabled.
I was having the same problem, what I did to solve it was the normal thing:
- select target in Groups and Files
- (i.e change it from 'iPhone/iPad' to 'iPhone').
and it was grayed out...
- so I've cleaned the project (Build/Clean All targets)
It solved my problem, so I advise you to after make some changes that supposing would made it work, to clean the project afterwards!
Hope it can help someone.
I've found the same problem but can upgrade if I right click the target rather than using the menu item.
Further more I've just realised that the menu item does become ungrayed out if you select the target in Groups & Files not in the drop down at the top.
I don't know if this post is still active.
In project info, take a look at "Architecture", if there's more than one entry, the "Upgrade target for ipad" is greyed.
Set you app to target iPhone in both the Project->Edit Project Settings: All Configurations
and in the side menu, where you right click the target ->Get Info same type of menu.
To be able to click the "Upgrade to Ipad(...)" you have to click and select the target. Then it will work.
I solved this problem by right clicking on the target -> get info -> build, and changing the targeted device family from iphone/ipad to iphone.
No biggie, but when I add the AVFoundation framework for the iPhone, it turns red for some reason I'm unable to figure out why. The project will not compile unless I add this framework, and if I do, Xcode will mark the framework red (apparently that means xcode cannot find the framework), but yet it will work.
This is quite annoying. Any clue what I might be doing wrong here?
Try adding AVFoundation framework via your target.
Look for your target under "Groups and Files"
"Get Info" for it
Click the "General" tab
At the bottom right of the window click the "+" button
At the top of your list you should find AVFoundation, add it.
close Xcode
delete your project
shut down your mac
take the mac back to your boss and tell him it's not working
wait until they figure out what it is
if this doesn't work, find a new job that doesn't require the use of a mac
All I had to do was open up the "General" settings tab for the project and change the "Base SDK for All Configurations" value. It was set to an SDK that I no longer had installed.