如果你所用的framework支持真机和模拟器多种CPU架构,而你需要的是其中的一种或几种,那么可以可以从framework中分离出各种架构,然后合并你需要的,具体的方式举例如下:
【ios】 framework分离与合并多种CPU架构
12 Monday Dec 2016
12 Monday Dec 2016
如果你所用的framework支持真机和模拟器多种CPU架构,而你需要的是其中的一种或几种,那么可以可以从framework中分离出各种架构,然后合并你需要的,具体的方式举例如下:
16 Tuesday Dec 2014
Tags
Src: http://blog.estimote.com/post/97824495825/ios-8-pushes-location-context-to-a-new-level-lock
Yesterday Apple rolled out the latest version of its mobile platform, iOS 8. If you’ve been following the news, then you’re already aware that engineers at Apple are extremely bullish about how next generation hardware and software will further contextual computing. The new HomeKit and HealthKit frameworks, for example, allow your iDevices to store relevant data from your health tracking and home automation apps. The potential it offers for contextually-aware solutions is tremendous. The feature that excites us the most, however, is Suggested Apps – a whole new way to leverage proximity to power real world intent.
more
The background on Suggested Apps
After installing iOS 8 you’ll begin to notice that sometimes an app icon will appear in the bottom left corner of the lock screen. This feature was introduced with the iOS 8 beta builds and talked about at WWDC back in June. Swiping up on that icon either opens the app (if already installed) or directs you straight to the App Store listing for that app (if not yet installed on your device). iOS 8 uses information about your current location to drive these suggestions. The idea behind this feature is to bring much more local context to your iPhone or iPad with just a single swipe.
For instance, Estimote’s NYC office is on the same block as an Equinox gym and our phones intelligently and automatically alert us to use that app. It’s super easy and intuitive to open the app while walking into the gym – and in the process, streamline the check-in flow with the gym’s front desk. However, because it solely uses GPS geofences, the accuracy is poor. We actually get the Equinox icon over 1 block away, and there is no control for the brands or stores (in this case Equinox) on how this appears.
Suggested Apps are now powered by iBeacon!
In beta releases of iOS 8, Suggested Apps was solely powered by GPS geofences – similar to how the “Popular Near Me” section of the App Store works. With iOS 8’s public release, however, Suggested Apps can now also be triggered by iBeacon.
Beacon-triggered Suggested Apps work slightly differently than GPS-triggered ones. The app in question does need to be installed on your device already to be suggested on the lock screen, when in proximity to a beacon. If the app uses the Core Location framework to monitor for beacon regions, it’s capable of detecting beacons even if it’s shut down completely. You’ll see the app icon in the bottom left corner and will be able to launch it immediately. At this point the app can also start ranging for nearby beacons, to determine the exact distance and proximity zone.
It’s important to note that Suggested Apps is backwards compatible. Therefore, if you already have an iBeacon app available on iTunes, your users can have it suggested by iOS 8.
We’ve already been making good use of this at Estimote HQ. The Proximitask app is a very simple, yet really useful tool that links up the default iOS Reminders app with specific beacons (and it’s been delivered by our amazing community during the RealityHack Challenge app competition earlier this year). Before iOS 8, beacons at each Estimote team member’s desk would remind him or her of their most important tasks each day – but only once and via a push notification. Now, a single swipe off the lock screen – whenever close to our desks and without repetitive push notifications – gives quick and elegant access directly to our to-do lists.
How do I use it in my app?
Making sure that your iBeacon app is taking advantage of the Suggested App feature in iOS 8 is actually pretty easy. All you need to do is set up regular beacon region monitoring (also known as a geofence) – and whenever your users enter the region being monitored by your app, its icon will automatically appear on the lock screen! This is absolutely massive news and shows how Apple iBeacon is helping add real world context to your daily lives. Any retailer or store can now surface an installed app on the user’s lockscreen.
We wanted to share some code on how all this works. Here’s a very simple implementation of AppDelegate that starts beacon region monitoring whenever your app is launched. This assumes you’ve already added the EstimoteSDK to your project (you can read how to do that here).
#import “ESTBeaconManager.h”
@interface AppDelegate () <ESTBeaconManagerDelegate>
@property (strong, nonatomic) ESTBeaconManager *beaconManager;
@end
@implementation AppDelegate
– (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.beaconManager = [[ESTBeaconManager alloc] init];
// modify the region definition to match your set of beacons
ESTBeaconRegion *region =
[[ESTBeaconRegion alloc]
initWithProximityUUID:ESTIMOTE_PROXIMITY_UUID
major:12345
minor:54321
identifier:@”My region”];
[self.beaconManager requestAlwaysAuthorization];
[self.beaconManager startMonitoringForRegion:region];
return YES;
}
@end
In case you want to look up more information about setting up regions and managing the beacon IDs, check this article on Estimote Community Portal. Additionally, the current version of our iOS app allows for easier UUID generation and handling.
Note that iOS 8 introduces a new authorization model for its Location Services. Long story short, to use beacon region monitoring your app needs to request permission to access a user’s location data even when it’s not on screen (the so-called “always” authorization). iOS 8 now also requires your app to provide a description of how it uses location data – which means that for the above code to work, you also need to add the following two lines to your Info.plist:
<key>NSLocationAlwaysUsageDescription</key>
<string>Easily access this application from your lock screen when you’re near an Equinox gym.</string>
We have an in-depth guide for handling the Location Services authorization levels for your iBeacon apps, so if you need more details on that, head over to our Community Portal.
Happy hacking!
Piotr Krawiec, Technology Evangelist at Estimote
Wojtek Borowicz, Community Evangelist at Estimote