首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Xcode 6.3 Parse错误‘无法生成模块'Parse’

Xcode 6.3 Parse错误‘无法生成模块'Parse’
EN

Stack Overflow用户
提问于 2016-01-14 05:51:24
回答 1查看 397关注 0票数 0

这是我相信这里未回答的问题的重复:https://stackoverflow.com/questions/34499353/could-not-build-module-parse-xcode-6-1-1

我已经尝试卸载并重新安装sdk,删除并重新插入框架,并将框架和sdk重新安装到一个全新的项目中,但每次我尝试在AppDelegate.m中添加#import它说无法构建模块‘解析’时,都会给出错误消息。以下是我遵循的步骤:https://parse.com/apps/quickstart#parse_data/mobile/ios/native/existing

请帮助我了解我哪里错了,任何反馈都将不胜感激。

AppDelegate.m

代码语言:javascript
复制
 #import "AppDelegate.h"
#import <Parse/Parse.h>

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    // Override point for customization after application launch.


    // [Optional] Power your app with Local Datastore. For more info, go to
    // https://parse.com/docs/ios/guide#local-datastore
    [Parse enableLocalDatastore];

    // Initialize Parse.
    [Parse setApplicationId:@"Removed for security purposes"
                  clientKey:@"Removed for security purposes"];

    // [Optional] Track statistics around application opens.
    [PFAnalytics trackAppOpenedWithLaunchOptions:launchOptions];


    // Register for Push Notitications
    UIUserNotificationType userNotificationTypes = (UIUserNotificationTypeAlert |
                                                    UIUserNotificationTypeBadge |
                                                    UIUserNotificationTypeSound);
    UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:userNotificationTypes
                                                                             categories:nil];
    [application registerUserNotificationSettings:settings];
    [application registerForRemoteNotifications];






    //Starting the ROXIMITY Engine!
    [ROXIMITYEngine startWithLaunchOptions:launchOptions engineOptions:nil applicationId:@"Removed for security purposes" andEngineDelegate:self];

    return YES;
}

- (void)applicationWillResignActive:(UIApplication *)application
{
    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
    // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.

    [ROXIMITYEngine resignActive]; // Place in applicationWillResignActive

}

- (void)applicationDidEnterBackground:(UIApplication *)application
{
    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
    // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
    [ROXIMITYEngine background];   // Place in applicationDidEnterBackground

}

- (void)applicationWillEnterForeground:(UIApplication *)application
{
    // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
    [ROXIMITYEngine foreground];   // Place in applicationWillEnterForeground

}

- (void)applicationDidBecomeActive:(UIApplication *)application
{
    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
    [ROXIMITYEngine active];       // Place in applicationDidBecomeActive

}

- (void)applicationWillTerminate:(UIApplication *)application
{
    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.



    [ROXIMITYEngine terminate];    // Place in applicationWillTerminate
}


//Adding the following methods for remote notification handling
-(void) application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
{
    [ROXIMITYEngine didFailToRegisterForRemoteNotifications:error];
} 

-(void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
    [ROXIMITYEngine didRegisterForRemoteNotifications:deviceToken];
    PFInstallation *currentInstallation = [PFInstallation currentInstallation];
    [currentInstallation setDeviceTokenFromData:deviceToken];
    currentInstallation.channels = @[@"global"];
    [currentInstallation saveInBackground];}



-(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo{


    [ROXIMITYEngine didReceiveRemoteNotification:application userInfo:userInfo];
    [PFPush handlePush:userInfo];

if (application.applicationState == UIApplicationStateInactive) {
    [PFAnalytics trackAppOpenedWithRemoteNotificationPayload:userInfo];
}
}

-(void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification{
    [ROXIMITYEngine didReceiveLocalNotification:application notification:(UILocalNotification *)notification];
}
-(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler{
    [ROXIMITYEngine didReceiveRemoteNotification:application userInfo:userInfo fetchCompletionHandler:completionHandler];
    if (application.applicationState == UIApplicationStateInactive) {
        [PFAnalytics trackAppOpenedWithRemoteNotificationPayload:userInfo];}
}

@end

AppDelegate.h

代码语言:javascript
复制
    #import <UIKit/UIKit.h>
#import "ROXIMITYSDK.h"

@interface AppDelegate: UIResponder <UIApplicationDelegate, ROXIMITYEngineDelegate>

@property (strong, nonatomic) UIWindow *window;


@end
EN

回答 1

Stack Overflow用户

发布于 2016-01-14 07:55:58

在尝试手动集成SDK时,我也遇到了这个问题。我通过使用cocoapods来处理集成Parse来解决它。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34777770

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档