2012-05-10 11 views
11

मेरा ऐप अब दो महीने के लिए AppStore में रहा है और हमेशा केवल iPhone पर काम किया पूरा करने के लिए सुनिश्चित करें। मैंने हाल ही में एक अपडेट सबमिट किया था जिसे अस्वीकार कर दिया गया था क्योंकि ऐप आईपैड पर नहीं चलता है। सही कारण इसे अस्वीकार कर दिया गया था: अस्वीकृति के लिएiPad पर एक iPhone विशिष्ट अनुप्रयोग काम एप्पल आवश्यकताओं

कारण: 2.10: iPhone ऐप्लिकेशन भी iPhone संकल्प पर, संशोधन के बिना iPad पर चलाना चाहिए, और 2X iPhone 3GS संकल्प पर

मैं क्या क्या Xcode में करने के लिए मेरे एप्लिकेशन 2X आइकन के साथ छोटे से बॉक्स में एक iPad पर चलने बनाने की जरूरत है?

किसी भी सुझाव दिए गए निर्देशों का बड़े पैमाने पर की सराहना की होगी ...

संपादित यह मेरा Info.plist है। यह मेरा पहला ऐप है और मुझे लगता है कि मैंने शुरुआत में इसे "सार्वभौमिक" के साथ स्थापित करने के लिए चुना था। क्या अब मेरे लिए इसे सुधारने के लिए कोई आसान तरीका है?

PLIST contents...

+0

आप आईपैड सिम्युलेटर पर इसे चलाने की कोशिश की है का वर्णन कर रहे हैं? क्या आपके पास @ 2x छवियां हैं? – Jamie

उत्तर

10

पता लगाना क्यों अपने app iPad पर पहले से ही काम नहीं करता द्वारा प्रारंभ। आईफोन के लिए विकसित अधिकांश ऐप्स बिना किसी संशोधन के आईपैड (संगतता मोड में) पर ठीक काम करेंगे; यदि आपका नहीं है, तो आपको इसे रोकने के लिए कुछ करना होगा। क्या आप कुछ हार्डवेयर फीचर पर भरोसा कर रहे हैं? जिस डिवाइस पर आप चल रहे हैं उसके बारे में निष्पक्ष धारणाएं बनाना? आईपैड पर चलने पर आपका ऐप असफल कैसे होता है?

एक बार जब आप यह पता लगाएंगे कि यह क्यों काम नहीं करता है, तो आप अब समस्या को ठीक करने के लिए बहुत करीब होंगे।

+0

यही मैं थक गया लेकिन मैंने अपने आईपैड में वर्तमान संस्करण डाउनलोड किया और मुझे डिफ़ॉल्ट यूआईटीएबीबार "फर्स्ट व्यू" और "दूसरा व्यू" मिलता है। मैं किसी भी हार्डवेयर सुविधाओं का उपयोग नहीं करता हूं। मेरा ऐप एथलीट के प्रशिक्षण सत्रों का ब्योरा देने वाला एक सरल ऐप है। सभी डेटा टेक्स्ट फ़ील्ड में कैप्चर किए जाते हैं और कोर डेटा में संग्रहीत होते हैं। क्या कोई एक्सकोड सेटिंग है जिसे मुझे जांचना चाहिए? – Sean

+4

क्या यह संभव है कि आपने अपने ऐप को एक सार्वभौमिक ऐप के रूप में सेट किया है (यानी जो कि दोनों डिवाइसों पर सामान्य रूप से चलता है) आईफोन-केवल ऐप के बजाय, और फिर आईपैड के लिए समर्थन लागू करने में विफल रहा? यदि नहीं, मुझे यकीन नहीं है कि मैं समझता हूं। आपकी Info.plist में क्या है? – Caleb

+1

सभी टिप्पणियों के लिए धन्यवाद। कृपया मुझे क्षमा करें क्योंकि यह मेरा पहला ऐप है जिसे मैंने लिखा है और ऐपस्टोर में सफलतापूर्वक सबमिट किया है। मैंने मूल प्रश्न संपादित किया है और PLIST सामग्री को जोड़ा है। मुझे लगता है कि मैंने इसे मूल रूप से महसूस किए बिना सार्वभौमिक ऐप के रूप में स्थापित किया था। क्या इसका उलट करने का कोई आसान तरीका है ताकि मेरा ऐप ऐप्पल द्वारा आवश्यक आईपैड पर आईफोन ऐप के रूप में काम करेगा? – Sean

7

आईफोन संगतता मोड में आईपैड पर चलाने के लिए अपना ऐप प्राप्त करने के लिए, आपको केवल आईफोन के लिए अपना ऐप बनाना होगा।

ऐप के प्लेस्ट (निब बेस, xib और स्टोरीबोर्ड) से सभी आईपैड संदर्भों को हटाएं, और लक्ष्य बिल्ड सेटिंग्स लक्षित डिवाइस परिवार से हटाएं।

+0

ईश्वर मुझे आशा है कि यह वास्तव में काम करता है क्योंकि अन्यथा मुझे कोई फर्क नहीं पड़ता कि – Aerovistae

4

मैं एक ही मुद्दा था, मैं निम्नलिखित परिवर्तन करने के बाद आईपैड पर मेरी अनुप्रयोग चलाने के लिए सक्षम था।

    परियोजना सेटिंग्स में
  1. iPhone करने के लिए डिवाइस बनाया (यह पहले सार्वभौमिक था)
  2. .plist में मुख्य कहानी बोर्ड फ़ाइल आधार ipad से संबंधित नाम हटा दिया।
+1

थानक्यू यह कैसे मदद करता है ...! – Vidhyanand

1

मैंने इस परिदृश्य का उपयोग कर एक ही समस्या हल की है।

आप अपने संसाधनों फ़ोल्डर में सामान्य और रेटिना छवियों के लिए जाँच करनी चाहिए।

Could not load the "image.png" image referenced from a nib in the bundle with identifier डीबग करते समय आपको यह त्रुटि भी मिल सकती है।

एक सामान्य iPhone एप्लिकेशन संशोधन के बिना दोनों (1x और 2x) मोड में आईपैड पर चलाना चाहिए। आप इसे एसडीके सिम्युलेटर के साथ देख सकते हैं।

ऐप्पल के आईओएस डेवलपर पोर्टल सेंटर पर ऐप स्टोर समीक्षा दिशानिर्देशों में एक लंबी सूची है जिसमें ऐप सबमिट करते समय ऐप्पल इन चीजों की समीक्षा करता है। इसे ध्यान से पढ़ें।

0

मैं समझाने के लिए क्या मेरी समस्या और समाधान था कोशिश करता हूँ ..

मैं जो ज्यादातर चित्र में है तथापि, एक iPhone केवल एप्लिकेशन है, की वजह से 1 या 2 UIViewControllers सभी UIInterfaceOrientations में रहना होगा जो, मैं अपने plist में सभी UIInterfaceOrientations सक्षम करने के लिए किया है।

iPad पर ऐप शुरू करते समय जो परिदृश्य में घुमाया जाता है और तालिका पर झूठ बोल रहा है (इसलिए UIDeviceOrientationFaceUp है), पूरा ऐप परिदृश्य में दिखाया गया था, जिसने मेरा यूआई पूरी तरह गड़बड़ कर दिया।

मुझे अपने प्लिस्ट या लॉन्च स्क्रीन में किसी भी आईपैड से संबंधित कोड/सेटिंग्स का कोई संदर्भ नहीं था (मैं लॉन्च स्क्रीन के लिए .xcassets का उपयोग कर रहा हूं)।

मैंने अपने AppDelegate.m पर कोड की एक पंक्ति जोड़कर इसे ठीक किया है जो ऐप को पोर्ट्रेट मोड में मजबूर करने के लिए स्टेटसबार अभिविन्यास सेट करता है।

-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
{ 
    [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationPortrait animated:NO]; 

    //Further setup 
} 
0

मैं एक ही मुद्दा Cocos2d 2.0

को उपयोग करने का मेरे समस्या यह थी कि परियोजना कई वर्षों में विकसित किया गया था और RootViewController और UIViewController और MyRootViewController जैसे कुछ अब बाक़ी फ़ाइलें साथ किए थे, आदि

उन्होंने उस समय काम किया लेकिन स्पष्ट रूप से आज की समीक्षा समिति के साथ एक झंडा उठाया क्योंकि मुझे "सभी आईफोन ऐप्स को आईपैड पर काम करना चाहिए" अस्वीकृति नोटिस प्राप्त हुआ। जोर से चिल्लाने और अंततः हार को स्वीकार करने के बाद, मैंने सोचा कि नीति केवल ऐप आईफोन बनाने में काफी मुश्किल बनाती है। अगर मैं इसके बारे में गलत हूं तो मुझे बताएं।

भले ही मैं इसके बारे में परेशान था (और अभी भी), मैंने सोचा कि शायद मैं कम से कम एक जटिल समाधान के साथ परियोजना को साफ कर सकता हूं जो मूल समस्या को नियंत्रित करता है: डिवाइस रोटेशन + सामग्री रोटेशन। मैं एक और हालिया परियोजना से कुछ का उपयोग कर समाप्त हुआ जो काम कर रहा था और अधिक सुरुचिपूर्ण लग रहा था और वास्तव में काम करता था: बस मेरे ऐपडिलेगेट के शीर्ष पर MyNavigationController जोड़ें।

मैंने नीचे दिया गया कोड जोड़ा है। मुझे यकीन है कि इसे बेहतर किया जा सकता है। अगर आप इसे बढ़ा सकते हैं तो कृपया टिप्पणी करें।

नतीजतन, मैं पुरानी रूटव्यू कंट्रोलर और MyRootViewController फ़ाइलों को हटाने में सक्षम था, इसलिए अब इसे बनाए रखना आसान है। मैंने कभी भी उनके उद्देश्य को बहुत अच्छी तरह से नहीं समझा। अच्छा छुटकारा! AppDelegate.h में

मैं घोषित करने के लिए मैं क्या कर रहा था:

यहाँ प्रदर्शित करने और डिवाइस अभिविन्यास + सामग्री उन्मुखीकरण मिलान करने के लिए अपने समाधान है

// फ़ाइल

के शीर्ष @ इंटरफ़ेस MyNavigationController: UINavigationController @end

// AppDelegate.h इंटरफ़ेस अंदर

MyNavigationController * navController_;

// से पहले @end

@property (रीड-ओनली) MyNavigationController * navController फ़ाइल के नीचे;

यहां कोड है जो मेरे ऐपडिलेगेट के शीर्ष पर काम करता है।

  1. मैं विभिन्न दृश्यों को प्रदर्शित करने के लिए दोनों लैंडस्केप और पोर्ट्रेट मोड की जरूरत: मीटर

    @implementation MyNavigationController

    // The available orientations should be defined in the Info.plist file. 
    // And in iOS 6+ only, you can override it in the Root View controller in the "supportedInterfaceOrientations" method. 
    // Only valid for iOS 6+. NOT VALID for iOS 4/5. 
    
    -(NSUInteger)supportedInterfaceOrientations { 
    
    UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation]; 
    
    if (orientation == UIDeviceOrientationPortrait) { 
    
        if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { 
    
         // [director_ pushScene: [IPAD scene]]; 
    
        } else { 
    
         [[CCDirectorIOS sharedDirector] pushScene:[VerticalDisplayLayer scene]]; 
    
         return UIInterfaceOrientationMaskPortrait; 
    
        } 
    
    
    } else if (orientation == UIDeviceOrientationLandscapeLeft) { 
    
    
        if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { 
    
         // [director_ pushScene: [IPAD scene]]; 
    
        } else { 
    
         [[CCDirectorIOS sharedDirector] pushScene:[MainMenuScene scene]]; 
    
        } 
    
    
    
    } else if (orientation == UIDeviceOrientationLandscapeRight) { 
    
    
        if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { 
    
         // [director_ pushScene: [IPAD scene]]; 
    
        } else { 
    
         [[CCDirectorIOS sharedDirector] pushScene:[MainMenuScene scene]]; 
    
        } 
    
    
    } else if (orientation == UIDeviceOrientationPortraitUpsideDown) { 
    
        if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { 
    
        } else { 
    
         [[CCDirectorIOS sharedDirector] pushScene:[VerticalDisplayLayer scene]]; 
    
         return UIInterfaceOrientationMaskPortraitUpsideDown; 
    
        } 
    
    } else { 
    
        //do nothing 
    } 
    
    return UIInterfaceOrientationMaskLandscape; 
    

    }

    //this is the one for iOS 6 
    - (BOOL)shouldAutorotate { 
    
    //NSLog(@"MyNavigationController - should Rotate ToInterfaceOrientation ..."); 
    
    UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation]; 
    
    // iPhone only 
    if([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) { 
    
        //NSLog(@"MyNavigationController - should Rotate iPhone"); 
    
        if (orientation == UIDeviceOrientationPortrait) { 
    
         //NSLog(@"should Rotate iPhone orientation is Portrait"); 
    
         [[CCDirectorIOS sharedDirector] pushScene:[VerticalDisplayLayer scene]]; 
    
         return UIInterfaceOrientationMaskPortrait; 
    
        } 
    
        if (orientation == UIDeviceOrientationPortraitUpsideDown) { 
    
         //NSLog(@"should Rotate iPhone orientation is PortraitUpsideDown"); 
    
         [[CCDirectorIOS sharedDirector] pushScene:[VerticalDisplayLayer scene]]; 
    
         return UIInterfaceOrientationMaskPortraitUpsideDown; 
    
        } 
    
        if (orientation == UIDeviceOrientationLandscapeLeft) { 
    
         //NSLog(@"should Rotate iPhone orientation is Landscape Left"); 
    
         return UIInterfaceOrientationMaskLandscape; 
        } 
    
        if (orientation == UIDeviceOrientationLandscapeRight) { 
    
         //NSLog(@"should Rotate iPhone orientation is Landscape Right"); 
    
         return UIInterfaceOrientationMaskLandscape; 
        } 
    
    
        return TRUE; 
    
    } 
    
    //return UIInterfaceOrientationIsLandscape(interfaceOrientation); 
    
    if([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) { 
    
        //NSLog(@"MyNavigationController - should Rotate iPad"); 
    
        return TRUE; 
    
    } 
    
    
    return TRUE; 
    } 
    
    
    // Supported orientations. Customize it for your own needs 
    // Only valid on iOS 4/5. NOT VALID for iOS 6. 
    - (BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation 
    { 
    
    // iPhone only 
    if([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) 
    
    
        return TRUE; 
    //return UIInterfaceOrientationIsLandscape(interfaceOrientation); 
    
    
    if([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) 
    
        return TRUE; 
    
    // iPad only 
    // iPhone only 
    //return UIInterfaceOrientationIsLandscape(interfaceOrientation); 
    
    return TRUE; 
    } 
    
    // This is needed for iOS4 and iOS5 in order to ensure 
    // that the 1st scene has the correct dimensions 
    // This is not needed on iOS6 and could be added to the application:didFinish... 
    -(void) directorDidReshapeProjection:(CCDirector*)director 
    { 
    if(director.runningScene == nil) { 
        // Add the first scene to the stack. The director will draw it immediately into the framebuffer. (Animation is started automatically when the view is displayed.) 
        // and add the scene to the stack. The director will run it when it automatically when the view is displayed. 
        [director runWithScene: [MainMenuScene scene]]; 
    } 
    } 
    
    
    -(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration 
    { 
    // Assuming that the main window has the size of the screen 
    // BUG: This won't work if the EAGLView is not fullscreen 
    
    CGRect screenRect = [[UIScreen mainScreen] bounds]; 
    CGRect rect = CGRectZero; 
    
    //NSLog(@"MyNavigationController - Will RotateToInterfaceOrientation ..."); 
    
    if(toInterfaceOrientation == UIInterfaceOrientationPortrait || toInterfaceOrientation == UIInterfaceOrientationPortraitUpsideDown) { 
    
        rect = screenRect; 
    
    
    } else if(toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft || toInterfaceOrientation == UIInterfaceOrientationLandscapeRight) { 
    
        rect.size = CGSizeMake(screenRect.size.height, screenRect.size.width); 
    
    } 
    
    CCDirector *director = [CCDirector sharedDirector]; 
    CCGLView *glView = (CCGLView *)[director view]; 
    glView.frame = rect; 
    } 
    
    @end 
    

    यहाँ कारण है कि मैं इस का समाधान करना था है।

यहाँ कुछ स्क्रीनशॉट उस स्थिति

JR Chemistry Set

most of the app orientation is landscape like this photo shows

other areas were only triggered when you turned the device

2 apps in one!

संबंधित मुद्दे